package com.dai.provider3001.impl;

import com.dai.provider3001.dao.DeptDao;
import com.dai.com_api.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptService {

    @Autowired
    private DeptDao deptDao;

    public boolean add(Dept dept){
        return deptDao.addDept(dept);
    }

    public Dept findById(int id){
        return deptDao.findById(id);
    }

    public List<Dept> findAll(){
        return deptDao.findAll();
    }
}
